Skip to content

Fix #7820: Break cycle when computing completerTypeParams #7847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 25, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 25, 2019

The following no longer crashes:

class C { type F[X <: F[_, _], Y] }

But it is still flagged as a cyclic reference error, whereas nsc accepts it. I believe it would be
tricky/risky to change dotc's algorithms to accept it as well, and I am not sure it's
necessary. Generally, we want to get away from F-bounds, so just accepting the most
common use case (F-bounds in method type parameters) is hopefully OK.

The following no longer crashes:

    class C { type F[X <: F[_, _], Y] }

But it is still flagged as a cyclic reference error, whereas nsc accepts it. I believe it would be
tricky/risky to change dotc's algorithms to accept it as well, and I am not sure it's
necessary. Generally, we want to get away from F-bounds, so just accepting the most
common use case (F-bounds in method type parameters) is hopefully OK.
@smarter smarter merged commit 2e3fbfd into scala:master Dec 25, 2019
@smarter smarter deleted the fix-#7820 branch December 25, 2019 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants